<script setup>
import { defineProps } from "vue";
let { dataInfo } = defineProps(["dataInfo"]);
</script>

<template>
  <div class="body">
    <view class="top flex_sb">
      <view class="left">
        <view class="title">{{ dataInfo.title || "--" }}</view>
        <view class="sub_title line1">有效期：{{ dataInfo.tagon_time || "--" }}至{{dataInfo.end_time||'--'}}</view>
      </view>
      <view class="right_price flex_c">
        <view class="price">{{ Math.round(Number(dataInfo.par_value))|| "--" }}</view>
        <view class="unit">元</view>
        <view class="circle_class flex_sa">
          <view
            class="circle_item"
            v-for="(item, index) in 9"
            :key="index"
          ></view>
        </view>
      </view>
    </view>
    <slot></slot>
  </div>
</template>

<style scoped lang="scss">
.body {
  .top {
    padding: 25rpx 30rpx;
    .left {
      .title {
        font-size: 32rpx;
        color: #000;
        margin-bottom: 15rpx;
      }
      .sub_title {
        font-size: 26rpx;
        color: #616161;
      }
    }
    .right_price {
      position: relative;
      width: 190rpx;
      height: 100rpx;
      line-height: 100rpx;
      background: #ffede4;
      border: 2rpx solid #ffe5d8;
      border-radius: 10rpx;
      margin-top: 20rpx;
      .circle_class {
        position: absolute;
        left: 0;
        bottom: -6rpx;
        width: 100%;
        height: 10rpx;
        line-height: 0;
        overflow: hidden;
        .circle_item {
          margin-left: 10rpx;
          width: 10rpx;
          height: 10rpx;
          border-radius: 50%;
          background: #fff;
          overflow: hidden;
        }
      }
      .price {
        color: #fe3a4a;
        font-size: 50rpx;
        margin-right: 5rpx;
      }
      .unit {
        margin-top: 15rpx;
        line-height: 30rpx;
        width: 30rpx;
        height: 30rpx;
        font-weight: bold;
        text-align: center;
        font-size: 18rpx;
        color: #fff;
        border-radius: 50%;
        background: #fe3a4a;
      }
    }
  }
}
</style>